//
//  ConfigureSaver.swift
//  Pods
//
//  Created by LC_WJH on 2017/10/17.
//
//

import Foundation

///配置物理保存工具
public class ConfigureSaver{
    
    public enum Methods{
        case UserDefault
    }
    
    public static var method:Methods = Methods.UserDefault
    
    public static func saveKey(_ k:String,v:String)->Void{
        
        if ConfigureSaver.method == .UserDefault {
            UserDefaults.standard.set(v, forKey: k);
            return;
        }
        
       
    }
    
    public static func loadKey(_ k:String)->String?{
        
        if ConfigureSaver.method == .UserDefault {
            return UserDefaults.standard.string(forKey: k);
        }
        
        return nil;
    }
 
}
